﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace MMS.Service
{
    public class DBSessionFactory
    {
        [ThreadStatic]
        public static IRespository.IDBSession _dbSession = null;
        public static IRespository.IDBSession GetDbSession()
        { 
        if(_dbSession==null)
            _dbSession = MMS.Utility.DI.GetObject<IRespository.IDBSession>("dalSession");
        return _dbSession;
        }
    }
}
